package com.alan.android.sqlite.builder;

import android.content.Context;

import com.alan.android.sqlite.AndroidSqlite;

/**
 * 打开其他目录下的DB文件
 */
public class DatabaseBuilder {

    private String path;

    private int version;

    private Context context;

    private DatabaseBuilder(Context context){
        this.context = context;
    }

    public static DatabaseBuilder create(Context context){
        return new DatabaseBuilder(context);
    }

    public String getPath() {
        return path;
    }

    public DatabaseBuilder setPath(String path) {
        this.path = path;
        return this;
    }

    public int getVersion() {
        return version;
    }

    public DatabaseBuilder setVersion(int version) {
        this.version = version;
        return this;
    }

    public AndroidSqlite build(){
        return new AndroidSqlite(context, path);
    }
}
